//package com.competition.web.admin.controller.base;
//
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//
//import com.page.PageResponseData;
//import com.competition.web.admin.param.IPage;
//import com.competition.web.admin.param.impl.IdParam;
//import com.competition.web.admin.param.impl.IdParamArray;
//import com.competition.web.admin.param.impl.PageParam;
//import com.competition.web.admin.param.impl.UpdateStatus;
//import com.basic.service.contract.IBaseService;
//import com.response.vo.ResponseModel;
//
///**
// * 
// * @author 111
// *
// * @param <T> 返回类型
// * @param <S> 参数类型
// */
//abstract public class AbstractController<T, S extends IPage> {
//
//	
//	abstract protected IBaseService<T> getBaseService(); 
//	
//	
//	protected PageResponseData<T> afterProcesser(PageResponseData<T> orderList) {
//	
//		return orderList;
//	}
//	
//	protected S frontProcesser(S param) {
//		
//		return param;
//	}
//	
//	
//	
//	/**
//	 * 删除
//	 * @param <V>
//	 * @param param
//	 * @return
//	 */
//	@PostMapping("/delete")
//	public ResponseModel<Integer> delete(@RequestBody @Validated IdParam param) {
//		return ResponseModel.<Integer>success(this.getBaseService().delete(param.getId()));
//	}
//	
//	/**
//	 * 删除
//	 * @param <V>
//	 * @param param
//	 * @return
//	 */
//	@PostMapping("/deleteByIds")
//	public ResponseModel<Integer> delete(@RequestBody @Validated IdParamArray param) {
//		return ResponseModel.<Integer>success(this.getBaseService().delete(param.getId()));
//	}
//
//	@RequestMapping(value = "/list", method = RequestMethod.POST)
//	public ResponseModel<PageResponseData<T>> list(@RequestBody @Validated PageParam pageParam) {
//
//		setPageSize(pageParam);
//		
//		PageResponseData<T> orderList = getBaseService().getDataByList(pageParam);
//
//		orderList = afterProcesser(orderList);
//
//		return ResponseModel.success(orderList);
//	}
//	
//	protected void setPageSize(IPage pageParam) {}
//	
//	@PostMapping("/updateStatus")
//	public ResponseModel<Integer> updateStatus(@RequestBody @Validated UpdateStatus certificateAddParam) {
//
//		return ResponseModel.<Integer>success(getBaseService().batchUpdateByIds(certificateAddParam));
//	}
//	
//	@RequestMapping(value = "/listBySearch", method = RequestMethod.POST)
//	public  ResponseModel<PageResponseData<T>> listBySearch(
//			@RequestBody @Validated S orderBySearchParam
//	) {
//		
//		setPageSize(orderBySearchParam);
//		
//		orderBySearchParam = frontProcesser(orderBySearchParam);
//		
//		PageResponseData<T> orderList = getBaseService().getDataByListBySearch(orderBySearchParam);
//
//		orderList = afterProcesser(orderList);
//		
//		return ResponseModel.success(orderList);
//	}
//	
//}
